// 引入二次封装的axios
import request from '../utils/request'

// 封装方法联想菜单
const getsuggestionAPI = ({ q }) => {
  return request({
    url: '/v1_0/suggestion',
    params: {
      q
    }
  })
}
// 封装方法获取搜索结果接口
const getSearchResultAPI = ({ q, page = 1 }) => {
  return request({
    method: 'GET',
    url: '/v1_0/search',
    params: {
      q,
      page
    }
  })
}
// 导出
export {
  getsuggestionAPI,
  getSearchResultAPI
}
